package cn.csust.net2.manager.server.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import cn.csust.net2.manager.shared.po.Academy;
import cn.csust.net2.manager.shared.po.Authority;
import cn.csust.net2.manager.shared.po.Role;
import cn.csust.net2.manager.shared.util.Constant;

/** 
 * @author 韩忠金
 * @version 创建时间：2012-1-25 下午07:05:26 
 * 类说明 
 * 用来处理复杂的SQL语句
 */
@Service(value=Constant.MAPPER_LOGIN)
public interface SqlMapper {
	
	public List<Authority> findAuthorities(@Param(value = "id")Long id);
	public List<Authority> findAuthoritiesByRoleId(@Param(value = "roleId")int roleId);
	int judgeAuthority(@Param(value = "id")Long id,@Param(value = "authority")String authority);
	public List<Role> loadRole(@Param(value = "userId")Long userId);
	public List<Academy> findAcademy(@Param(value = "fileNotificationId")Integer fileNotificationId);
	public void addRole(@Param(value = "userId")Long userId,@Param(value = "roleId") int roleId); 
	public void deleteRole(@Param(value = "userId")Long userId,@Param(value = "roleId") int roleId);
	public void addFileNotification(@Param(value = "academyID")int academyID,@Param(value = "fileNotificationID") int fileNotificationID);
	public void deleteFileLoadNotification(@Param(value = "id")int id);
}
